dicts.{dictId}.items.{parentId}.children
树形获取子节点
- 请求路由:
dicts.{dictId}.items.{parentId}.children- 交互模型:
Request Stream- 访问限制: 无
请求
RSocket.rs({
"route" : "dicts.region.items.001.children",
"args" : {
"search" : {
"keyword" : ""
},
"pg" : {
"page" : 0,
"size" : 10
}
}
});
请求参数
| 名称 | 类型 | 必须 | 说明 |
|---|---|---|---|
dictId | String | 是 | 字典标识 |
parentId | String | 是 | 父级节点标识 |
search | Object | 否 | 查询参数 |
search.itemId | String | 否 | 字典项标识 |
search.name | String | 否 | 字典项名称 |
search.parentId | String | 否 | 父项标识 |
search.fullId | String | 否 | 树形字典结构中, 与父项形成的完整标识 这个参数会按照正则表达式进行匹配 |
search.sortWeight | Number | 否 | 排序权重 |
search.description | String | 否 | 说明 |
search.disabled | Boolean | 否 | 是否禁用 |
search.extras | Object | 否 | extra查询参数键值对, 将按照正则表达式匹配. |
search.keyword | String | 否 | 模糊匹配关键字 |
search.from | String | 否 | 查询起始时间,时间样式为RFC3339格式,如:2019-04-18T00:13:39.649Z |
search.to | String | 否 | 查询终止时间,时间样式为RFC3339格式,如:2019-04-19T00:13:39.649Z |
pg | Object | 否 | 分页参数 |
pg.page | Number | 否 | 页码,首页从0开始 |
pg.size | Number | 否 | 每页记录,默认为10 |
pg.sort | String[] | 否 | 排序字段清单,默认为升序,需要指定降序时在字段名后面添加desc并用分号隔开。 例如:["id", "crDate;desc"] |
返回
符合条件的字典项
[
{
"tenantId" : "mzd",
"dictId" : "region",
"itemId" : "001001",
"name" : "宝安区",
"parentId" : "001",
"fullId" : "001:001001",
"sortWeight" : 1.0,
"description" : "宝安区",
"disabled" : false,
"extras" : {
"long_lat" : {
"value" : "113.883805,22.554999",
"title" : "经纬度",
"sortWeight" : 2.0
},
"adcode" : {
"value" : "440306",
"title" : "行政区划代码",
"sortWeight" : 3.0
},
"hot" : {
"value" : null,
"title" : "热门区域",
"sortWeight" : 4.0
}
},
"ts" : "2023-03-21T08:25:14.123Z"
},
{
"tenantId" : "mzd",
"dictId" : "region",
"itemId" : "001002",
"name" : "南山区",
"parentId" : "001",
"fullId" : "001:001002",
"sortWeight" : 1.0,
"description" : "南山区",
"disabled" : false,
"extras" : {
"long_lat" : {
"value" : "113.912974,22.513668",
"title" : "经纬度",
"sortWeight" : 2.0
},
"adcode" : {
"value" : "440305",
"title" : "行政区划代码",
"sortWeight" : 3.0
}
},
"ts" : "2023-03-19T09:00:16.518Z"
}
]
返回属性
| 名称 | 类型 | 说明 |
|---|---|---|
dictId | String | 字典标识 |
itemId | String | 字典项标识 |
name | String | 字典项名称 |
parentId | String | 树形字典项的父项itemId,顶级节点为null |
fullId | String | 对于树形字典项,返回按层级关系组织父级条目的itemId形成fullId |
sortWeight | Number | 排序权重 |
description | String | 说明 |
disabled | Boolean | 是否启用 |
extras | Object | 字典项扩展属性 |
extras.{key}.value | Varies | 值 |
extras.{key}.title | String | 显示标题 |
extras.{key}.sortWeight | Number | 排序权重 |
tenantId | String | 租户ID |
ts | String | 返回最后修改时间 |